class LoginModel {
  final String? username;
  final String? imId;
  final String? token;
  final String? avatar;

  LoginModel({
    this.username,
    this.imId,
    this.token,
    this.avatar
  });

  factory LoginModel.fromJson(Map<String, dynamic> json) {
    return LoginModel(
      username: json['username'] as String?,
      imId: json['imId'] as String?,
      token: json['token'] as String?,
      avatar: json['avatar'] as String?
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'username': username,
      'imId': imId,
      'token': token,
      'avatar': avatar
    };
  }
}
